﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Automata.examen2
{
    public partial class Eigen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.ClientScript.IsClientScriptIncludeRegistered("MyScript"))
            {
                Page.ClientScript.RegisterClientScriptInclude("MyScript", "../functions.js");
            }
        }

        protected void btnEvaluar_Click(object sender, EventArgs e)
        {
            if (!fupMatriz.HasFile)
                return;

            EigenVectores ei = new EigenVectores ();

            resultLabel.Text = ei.genera(fupMatriz.FileContent);
            //balance the matrix
            ei.balanceMatrix();
            //create a hessenberg version of the matrix
            ei.createHessenberg();
            //calculate eigenvalues end eigenvectors
            //ei.hqr();
        }
    }
}